﻿#include <iostream>
#include "mdclieapi.hpp"

int main(int argc, char* argv[])
{
	bool verbose = (argc > 1 && std::string(argv[1]) == "-v");
	try
	{
		mdclient client("tcp://localhost:5555", verbose);

		zframe request;
		request.push_back("echo");
		zframe reply = client.send("mmi.service", request);
		if (!reply.is_empty())
		{
			std::string reply_code = to_string(reply.front());
			info("Lookup echo service: {}", reply_code);
		}
		else
		{
			info("no response from broker, make sure it's running");
		}
	}
	catch (zmq::error_t& e)
	{
		info("error {}", e.what());
	}


	int a;
	std::cin >> a;
}
